import Mock from 'mockjs2'
import { builder } from '../util'

const pageData = () => {
    return builder({
        total: 99,
        current: 6,
        size: 20,
        records: [{
            'id': 1002,
            'name': '深度复盘！裂变23级、裂变率97%，苏宁、顺丰日涨万粉背后的操盘秘诀',
            'createdTime': 1603271444032,
            'poster': 'https://xiaoliebian-sys.oss-cn-hangzhou.aliyuncs.com/img/operation/poster/066b58c1a8f84e3b80cfc303a67114d3.jpg',
            'desc': '双11还在专注用户增长的运营人，一晚涨粉过万！ 点击查看他们的涨粉秘诀吧 ↑↑↑',
            'url': 'https://mp.weixin.qq.com/s/OI8mtDo4SeWa5fBCWyQ_dQ'
        }, {
            'id': 1003,
            'name': '深度复盘！裂变23级、裂变率97%，苏宁、顺丰日涨万粉背后的操盘秘诀',
            'createdTime': 1603271444032,
            'poster': 'https://xiaoliebian-sys.oss-cn-hangzhou.aliyuncs.com/img/operation/poster/066b58c1a8f84e3b80cfc303a67114d3.jpg',
            'desc': '双11还在专注用户增长的运营人，一晚涨粉过万！ 点击查看他们的涨粉秘诀吧 ↑↑↑',
            'url': 'https://mp.weixin.qq.com/s/OI8mtDo4SeWa5fBCWyQ_dQ'
        }, {
            'id': 1004,
            'name': '深度复盘！裂变23级、裂变率97%，苏宁、顺丰日涨万粉背后的操盘秘诀',
            'createdTime': 1603271444032,
            'poster': 'https://xiaoliebian-sys.oss-cn-hangzhou.aliyuncs.com/img/operation/poster/066b58c1a8f84e3b80cfc303a67114d3.jpg',
            'desc': '双11还在专注用户增长的运营人，一晚涨粉过万！ 点击查看他们的涨粉秘诀吧 ↑↑↑',
            'url': 'https://mp.weixin.qq.com/s/OI8mtDo4SeWa5fBCWyQ_dQ'
        }, {
            'id': 1005,
            'name': '深度复盘！裂变23级、裂变率97%，苏宁、顺丰日涨万粉背后的操盘秘诀',
            'createdTime': 1603271444032,
            'poster': 'https://xiaoliebian-sys.oss-cn-hangzhou.aliyuncs.com/img/operation/poster/066b58c1a8f84e3b80cfc303a67114d3.jpg',
            'desc': '双11还在专注用户增长的运营人，一晚涨粉过万！ 点击查看他们的涨粉秘诀吧 ↑↑↑',
            'url': 'https://mp.weixin.qq.com/s/OI8mtDo4SeWa5fBCWyQ_dQ'
        }
        ]
    })
}

const CustomePageData = () => {
    return builder({
        total: 99,
        current: 6,
        size: 20,
        records: [{
            'id': 1,
            'url': 'https://xiaoliebian-sys.oss-cn-hangzhou.aliyuncs.com/img/operation/poster/hjy/20200731/ee215baa5a8f484ca133dd73f8538777.jpg?720'
        },
            {
                'id': 2,
                'url': 'https://xiaoliebian-sys.oss-cn-hangzhou.aliyuncs.com/img/operation/poster/hjy/20200731/ee215baa5a8f484ca133dd73f8538777.jpg?720'
            },
            {
                'id': 3,
                'url': 'https://xiaoliebian-sys.oss-cn-hangzhou.aliyuncs.com/img/operation/poster/hjy/20200731/ee215baa5a8f484ca133dd73f8538777.jpg?720'
            }
        ]
    })
}

const customerDynamicList = () => {
    return builder([{
        tagName: '教育',
        id: 1
    }, {
        tagName: '医疗',
        id: 2
    }, {
        tagName: '旅游',
        id: 3
    }, {
        tagName: '餐饮',
        id: 4
    }, {
        tagName: '酒店',
        id: 5
    }])
}

Mock.mock(/\/qw\/Fission\/FissionPosterPage/, 'get', pageData)
Mock.mock(/\/qw\/Fission\/listTag/, 'get', customerDynamicList)

Mock.mock(/\/qw\/Fission\/FissionCopywriterPage/, 'get', CustomePageData)
